<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent)-wasi;$(NetCoreAppCurrent)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.PlatformNotSupported_Compression</GeneratePlatformNotSupportedAssemblyMessage>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
    <Compile Include="$(CommonPath)Interop\Interop.zlib.cs" />
    <Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipArchive.cs" />
    <Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipArchiveEntry.cs" />
    <Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipArchiveMode.cs" />
    <Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipBlocks.cs" />
    <Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipCustomStreams.cs" />
    <Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipHelper.cs" />
    <Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipVersion.cs" />
    <Compile Include="System\IO\Compression\DeflateManaged\BlockType.cs" />
    <Compile Include="System\IO\Compression\DeflateManaged\DeflateManagedStream.cs" />
    <Compile Include="System\IO\Compression\DeflateManaged\HuffmanTree.cs" />
    <Compile Include="System\IO\Compression\DeflateManaged\InflaterManaged.cs" />
    <Compile Include="System\IO\Compression\DeflateManaged\InflaterState.cs" />
    <Compile Include="System\IO\Compression\DeflateManaged\InputBuffer.cs" />
    <Compile Include="System\IO\Compression\DeflateManaged\MatchState.cs" />
    <Compile Include="System\IO\Compression\DeflateManaged\OutputWindow.cs" />
    <Compile Include="System\IO\Compression\DeflateZLib\Deflater.cs" />
    <Compile Include="System\IO\Compression\DeflateZLib\DeflateStream.cs" />
    <Compile Include="System\IO\Compression\DeflateZLib\Inflater.cs" />
    <Compile Include="System\IO\Compression\DeflateZLib\ZLibException.cs" />
    <Compile Include="$(CommonPath)System\IO\Compression\ZLibNative.cs"
             Link="Common\System\IO\Compression\ZLibNative.cs" />
    <Compile Include="$(CommonPath)System\IO\Compression\ZLibNative.ZStream.cs"
             Link="Common\System\IO\Compression\ZLibNative.ZStream.cs" />
    <Compile Include="System\IO\Compression\CompressionLevel.cs" />
    <Compile Include="System\IO\Compression\CompressionMode.cs" />
    <Compile Include="System\IO\Compression\Crc32Helper.ZLib.cs" />
    <Compile Include="System\IO\Compression\GZipStream.cs" />
    <Compile Include="System\IO\Compression\PositionPreservingWriteOnlyStreamWrapper.cs" />
    <Compile Include="System\IO\Compression\ZLibStream.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs"
             Link="Common\System\Obsoletions.cs" />
  </ItemGroup>

  <!-- Windows specific files -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="System\IO\Compression\ZipArchiveEntry.Windows.cs" />
    <Compile Include="$(CommonPath)System\IO\Compression\ZipArchiveEntryConstants.Windows.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
  </ItemGroup>

  <!-- Unix specific files -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix' or '$(TargetPlatformIdentifier)' == 'browser' or '$(TargetPlatformIdentifier)' == 'wasi'">
    <Compile Include="System\IO\Compression\ZipArchiveEntry.Unix.cs" />
    <Compile Include="$(CommonPath)System\IO\Compression\ZipArchiveEntryConstants.Unix.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
             Link="Common\Interop\Unix\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.PathConf.cs"
             Link="Common\Interop\Unix\System.Native\Interop.PathConf.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.Stat.cs"
             Link="Common\Interop\Unix\System.Native\Interop.Stat.cs" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="System.Collections" />
    <Reference Include="System.Memory" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.InteropServices" />
    <Reference Include="System.Threading" />
  </ItemGroup>

</Project>
